<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;">
        <meta name="description" content="">
        <meta name="author" content="mandrill-cms">
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title><?php echo Mandrill::getApp()->title; ?></title>
        <?php echo $mlStylesheets; ?>
        <?php echo $mlScripts; ?>
    </head>
    <body>
        <div class="ml-admin-header-wrapper">
            <div class="ml-admin-header">
                <div class="ml-admin-header-logo">
                    <a href="#">Mandrill</a>
                </div>
                <div class="ml-admin-clear"></div>
            </div>
        </div>
        <div class="ml-admin-clear">&nbsp;</div>
        <div class="ml-admin-nav-wrapper-repeat">
            <div class="ml-admin-nav-wrapper">
                <div class="ml-admin-nav-right">
                    <div class="ml-admin-nav-divider">&nbsp;</div>
                    <div class="ml-admin-nav-account-link">
                        <div class="ml-admin-nav-account-img"></div>
                        <span class="ml-admin-nav-account-text"><b><?php echo __t('mandrill.admin.account', array('username'=>  MSession::getInstance()->getUsername())); ?></b></span>
                    </div>
                    <div class="ml-admin-nav-divider">&nbsp;</div>
                    <a href="<?php echo __route('ml-admin/home/logout'); ?>" class="ml-admin-nav-logout-link">
                        <div class="ml-admin-nav-logout-img"></div>
                        <span class="ml-admin-nav-logout-text"><b><?php echo __t('mandrill.admin.logout'); ?></b></span>
                    </a>
                    <div class="ml-admin-clear">&nbsp;</div>
                </div>

                <div class="ml-admin-nav">
                    <div class="ml-admin-nav-table">
                        <ul class="ml-admin-nav-select">
                            <li>
                                <a href="<?php echo __route('ml-admin'); ?>"><b><?php echo __t('mandrill.admin.controlPanel'); ?></b><!--[if IE 7]><!--></a><!--<![endif]-->
                            </li>
                            <div class="ml-admin-nav-divider">&nbsp;</div>
                            <li>
                                <a href="<?php echo __route('ml-admin/module'); ?>"><b><?php echo __t('mandrill.admin.modules'); ?></b><!--[if IE 7]><!--></a><!--<![endif]-->
                            </li>
                            <div class="ml-admin-nav-divider">&nbsp;</div>
                            <li>
                                <a href="<?php echo __route('ml-admin/plugin'); ?>"><b><?php echo __t('mandrill.admin.plugins'); ?></b><!--[if IE 7]><!--></a><!--<![endif]-->
                            </li>
                            <div class="ml-admin-nav-divider">&nbsp;</div>
                            <li>
                                <a href="<?php echo __route('ml-admin/page'); ?>"><b><?php echo __t('mandrill.admin.pages'); ?></b><!--[if IE 7]><!--></a><!--<![endif]-->
                            </li>
                        </ul>
                        <div class="ml-admin-clear"></div>
                    </div>
                    <div class="ml-admin-clear"></div>
                </div>
                <?php if (isset($installedModules) && !empty($installedModules)): ?>
                <div class="ml-admin-clear"></div>
                <div class="ml-admin-nav-sub">
                    <div class="ml-admin-nav-sub-table">
                        <ul class="ml-admin-nav-sub-select">
                            <?php
                            foreach ($installedModules as $module){
                                echo __tag('li', array(),
                                        __tag('a', array('href'=>'?r=ml-admin&module='.$module->name),
                                            '<b>'.__t('mandrill.module.name', NULL, $module->name, 'modules').'</b>'
                                            )
                                        );
                            }
                            ?>
                        </ul>
                        <div class="ml-admin-clear"></div>
                    </div>
                </div>
                <?php endif; ?>
            </div>
            <div class="ml-admin-clear"></div>
        </div>
        <div class="ml-admin-clear"></div>
        <div class="ml-admin-content-wrapper">
            <div class="ml-admin-content">
                <?php echo $mlContent; ?>
            </div>
        </div>
    </body>
</html>